#pragma once

#include <memory>
#include <ProFeature.h>
#include "wProElement.hpp"


namespace witotk{

	class wProFeature :public ProFeature
	{
	public:
		wProFeature(const ProFeature & ft)
			:ProFeature(ft)
		{}

		~wProFeature()
		{

		}

		wProElemtree_ptr ExtractElemtree(ProAsmcomppath* path )
		{
			ProElement eletree;
			ProError error = ProFeatureElemtreeExtract (
				this,path,PRO_FEAT_EXTRACT_NO_OPTS
				,&eletree);
			PROE_THROW(error,"ExtractElemtree");
			wProElemtreeCopy_ptr rt(new wProElemtreeCopy(eletree));
			rt->m_owner = *this;
			return rt;
		}

		void Redefine(ProAsmcomppath* path ,ProElement eletree)
		{
			ProFeatureCreateOptions  opts[] = { PRO_FEAT_CR_FIX_MODEL_ON_FAIL };

			ProErrorlist p_errors;
			ProError error = ProFeatureRedefine(path,this,eletree,opts,1,&p_errors);
			PROE_THROW(error,"Redefine");
		}

		

		//wProElement_ptr ElementGet;
		
		
	};


}